<?php
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
$path_logo = JURI::root().'images/logo_image/';
$path_img = JURI::root().'images/image_product/';
?>
<link rel="stylesheet" href="<?php echo JURI::root().'components/com_shop/assets/'; ?>style.css" type="text/css" />

<div class="detail-box-company">
<div class="item_page_title">
<h2 style="color: white !important;"><?php echo $this->item->vtitle; ?>,<?php echo $this->item->etitle; ?></h2>
</div>
<div class="detail-box-company-content">
<div class="detail-company-logo">
<img src="<?php echo $path_logo.$this->item->logo_img; ?>" class="dt-logo-company" title="<?php echo $this->item->vtitle;?>" />
</div>
<div class="dt-info-company">
	<ul>
    	<li>
        	<span>Tiếng việt: </span><?php echo $this->item->vtitle; ?>
        </li>
        <?php if(!empty($this->item->etitle)):?>
        <li>
        	<span>Tiếng anh: </span><?php echo $this->item->etitle;?>
        </li>
        <?php endif; ?>
        
         <?php if(!empty($this->item->address)):?>
        <li>
        	<span>Địa chỉ: </span><?php echo $this->item->address;?>
        </li>
        <?php endif; ?>
        
         <?php if(!empty($this->item->phone)):?>
        <li>
        	<span>Số điện thoại: </span><?php echo $this->item->phone;?>
        </li>
        <?php endif; ?>
         <?php if($this->item->fax != 0):?>
        <li>
        	<span>Số Fax: </span><?php echo $this->item->fax;?>
        </li>
        <?php endif; ?>
         <?php if(!empty($this->item->yahoo)):?>
        <li>
        	<span>Yahoo: </span><?php echo $this->item->yahoo;?>
        </li>
        <?php endif; ?>
         <?php if(!empty($this->item->skyper)):?>
        <li>
        	<span>Skyper: </span><?php echo $this->item->skyper;?>
        </li>
        <?php endif; ?>
        <?php if(!empty($this->item->website)):?>
        <li>
        	<span>Website: </span><?php echo $this->item->website; ?>
        </li>
        <?php endif;?>
        <li>
        	<span>Giới thiệu:</span><br />
            <?php echo $this->item->introtext;?>
        </li>
    </ul>
</div>
</div>
</div>
<!-- san pham -->
<div class="detail-box-company-product">
<div class="item_page_title">
<h2 style="color: white !important;">Sản phẩm hiện có</h2>
</div>
<?php 
$pathfile = JURI::root().'images/image_product/';
$db = JFactory::getDBO();
$query = $db->getQuery(true);
$query->select('*');
$query->from('#__shop_attach');
$query->where('product_id = '.$this->item->id);
$db->setQuery((string)$query);
$files = $db->loadObjectList();
?>
<div class="detail-produt">
<ul>
	<?php foreach($files as $file):?>
    	<li>
        <img src="<?php echo $pathfile.$file->filename;?>" alt="<?php echo $this->item->vtitle.','.$this->item->etitle;?>" height="80" title="<?php echo $this->item->vtitle.','.$this->item->etitle;?>" />
        </li>
    <?php endforeach;?>
</ul>
</div>
</div>